ButtonsFactory = {
	S: function(){
		return new Separator('S', {
			icon: "images/separator.gif"
		});
	},
	
	B: function(){
		return new Button('B', {
			command: "Bold",
			icon: "images/bold.gif",
			hover: "images/bold-hover.gif"
		});
	},
	
	I: function(){
		return new Button('I', {
			command: "Italic",
			icon: "images/italic.gif",
			hover: "images/italic-hover.gif"
		});
	},
	
	U: function(){
		return new Button('U', {
			command: "Underline",
			icon: "images/underline.gif",
			hover: "images/underline-hover.gif"
		});
	},
	
	OL: function(){
		return new Button('OL', {
			command: "InsertOrderedList",
			icon: "images/orderedlist.gif",
			hover: "images/orderedlist-hover.gif"
		});
	},
	
	UL: function(){
		return new Button('UL', {
			command: "InsertUnOrderedList",
			icon: "images/unorderedlist.gif",
			hover: "images/unorderedlist-hover.gif"
		});
	}, 
	
	JL: function(){
		return new Button('JL', {
			command: "JustifyLeft",
			icon: "images/justifyleft.gif",
			hover: "images/justifyleft-hover.gif"
		});
	},
	
	JC: function(){
		return new Button('JC', {
			command: "JustifyCenter",
			icon: "images/justifycenter.gif",
			hover: "images/justifycenter-hover.gif"
		});
	},
	
	JR: function(){
		return new Button('JR', {
			command: "JustifyRight",
			icon: "images/justifyright.gif",
			hover: "images/justifyright-hover.gif"
		});
	},
	
	FG: function(){
		return new ColorChooserButton('FG', '#000', {
			command: "ForeColor",
			icon: "images/forecolor.gif",
			hover: "images/forecolor-hover.gif"
		});
	},	

	BG: function() {
        if (window.gecko || window.opera) {
            return new ColorChooserButton('BG', '#000', {
                command: "HiliteColor",
                icon: "images/backcolor.gif",
                hover: "images/backcolor-hover.gif"
            });
        } else {
            return new ColorChooserButton('BG', '#000', {
                command: "BackColor",
                icon: "images/backcolor.gif",
                hover: "images/backcolor-hover.gif"
            });
        }
	},
	
	FS: function(){
		return new StyleChooserButton('FS', 'normal', {
			command: 'FontSize',
			values: {
				'x-small': '1',
				'small': '2',
				'normal': '3',
				'big': '5',
				'x-big': '6'
			},
			stylize: function(element, value){
				switch (value) {
					case '1':
						element.style.fontSize = '8px';
						break;
					case '2':
						element.style.fontSize = '10px';
						break;
					case '3':
						element.style.fontSize = '14px';
						break;
					case '5':
						element.style.fontSize = '20px';
						break;
					case '6':
						element.style.fontSize = '24px';
						break;
				}
			}
		});
	},
	
	FF: function(){
		return new StyleChooserButton('FF', 'Trebuchet', {
			command: 'FontName',
			stylize: function(element, value){
				element.style.fontFamily = value;
			},
			value: 'Trebuchet MS',
			values: {
				'Trebuchet': 'Trebuchet MS',
				'Arial': 'Arial',
				'Tahoma': 'Tahoma',
				'Verdana': 'Verdana',
				'Times': 'Times New Roman',
				'Courier': 'Courier New',
				'Garamond': 'Garamomd'
			}
		});
	}
};
